package com.liuweijiaoyu.demo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity implements View.OnClickListener{
    private Button btnDoHomeWork;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.act_main);
        btnDoHomeWork= (Button) findViewById(R.id.btn_do_homework);
        btnDoHomeWork.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent=null;
        switch (v.getId()){
            case R.id.btn_do_homework:
                intent=new Intent(MainActivity.this,HkQuestionActivity.class);
                startActivity(intent);
        }
    }
}
